
#include "ConfigHandler.h"


ConfigHandler::ConfigHandler(){
	setDefaultConfiguration();
}

ConfigHandler::~ConfigHandler(){

}

void ConfigHandler::setDefaultConfiguration(){
	setDefaultOCM();
}

void ConfigHandler::setDefaultSienaFF(){
	subManagerType = SIENAFF;
	storageType = DATABASE;
	memoryTableType = PRIORITY;
	numSlot = 5000;
	memManagerExecutionFlow = SERIAL;
	subsThreshold = 100;
	numInterval = 4;
	lastThreshold = 0.4;
	numProc = 1;
}

void ConfigHandler::setDefaultOCM(){
	subManagerType = OCM;
	storageType = DATABASE;
	memoryTableType = EVENT;
	numSlot = 5000;
	numProc = 1;
	lastThreshold = 0.4;
}

void ConfigHandler::setDefaultOracle(){
	subManagerType = OCM;
	storageType = DISK;
	memoryTableType = FIFO;
	numSlot = -1;
	numProc = 1;
}

IndexingType ConfigHandler::getIndexingType() const
{
    return indexingType;
}

float ConfigHandler::getLastThreshold() const
{
    return lastThreshold;
}

ExecutionFlowType ConfigHandler::getMemManagerExecutionFlow() const
{
    return memManagerExecutionFlow;
}

MemoryTableType ConfigHandler::getMemoryTableType() const
{
    return memoryTableType;
}

int ConfigHandler::getNumInterval() const
{
    return numInterval;
}

int ConfigHandler::getNumProc() const
{
    return numProc;
}

int ConfigHandler::getNumSlot() const
{
    return numSlot;
}

StorageType ConfigHandler::getStorageType() const
{
    return storageType;
}



int ConfigHandler::getSubsThreshold() const
{
    return subsThreshold;
}

void ConfigHandler::setIndexingType(IndexingType indexingType)
{
    this->indexingType = indexingType;
}

void ConfigHandler::setLastThreshold(float lastThreshold)
{
    this->lastThreshold = lastThreshold;
}

void ConfigHandler::setMemManagerExecutionFlow(ExecutionFlowType memManagerExecutionFlow)
{
    this->memManagerExecutionFlow = memManagerExecutionFlow;
}

void ConfigHandler::setMemoryTableType(MemoryTableType memoryTableType)
{
    this->memoryTableType = memoryTableType;
}

void ConfigHandler::setNumInterval(int numInterval)
{
    this->numInterval = numInterval;
}

void ConfigHandler::setNumProc(int numProc)
{
    this->numProc = numProc;
}

void ConfigHandler::setNumSlot(int numSlot)
{
    this->numSlot = numSlot;
}

void ConfigHandler::setStorageType(StorageType storageType)
{
    this->storageType = storageType;
}

void ConfigHandler::setSubsThreshold(int subsThreshold)
{
    this->subsThreshold = subsThreshold;
}

SubscriptionManagerType ConfigHandler::getSubManagerType() const
{
    return subManagerType;
}

void ConfigHandler::setSubManagerType(SubscriptionManagerType subManagerType)
{
    this->subManagerType = subManagerType;
}





